package com.yf.controller;

import com.yf.model.Order;
import com.yf.model.User;
import com.yf.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private IOrderService orderService;
    @RequestMapping("list")
    public  List<Order> list(Model model,Integer id){
        return orderService.listOrder();
    }
}
